Added Player vs Computer mode using Magic Square algorithm#19
Merged
Conversation
Contributor
Author
|
@subhamdas461 Kindly review my PR and merge and close PR. Please assign HactoberFest labels. |
Owner
|
Hello @PThanushree, the code has some issues:
Thanks. 👍 |
Contributor
Author
|
Changes Update: Prevented the UI from scrolling out of the viewport. @subhamdas461 Kindly review the PR and do close PR by assigning HactoberFest labels/tag. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This update introduces a new Player vs Computer (PvC) game mode.
The computer’s moves are generated using the Magic Square algorithm, allowing it to play intelligently by analyzing winning positions and blocking player moves effectively.
Key Updates
Added a PvC mode toggle alongside existing PvP mode
Implemented Magic Square algorithm for computer move logic
Updated UI to:
Show mode selection buttons (blue by default, green when active)
Confirm restart before switching modes
Ensured smooth game restart flow and correct mode persistence
Testing Performed
Verified switching between PvP and PvC shows confirmation prompt correctly
Confirmed computer moves follow optimal logic using Magic Square
Checked UI responsiveness and button state highlighting
@subhamdas461 Kindly merge My PR assigning HactoberFest label